package gof.strategy;

public class Main {
    public static void main(String[] args) {
        Player aaa = new Player("aaa", new WinStrategy(2));
        Player lxt = new Player("lxt", new ProbStrategy(3));
        for (int i = 0; i < 100000; i++) {
            Hand hand1 = aaa.nextHand();
            Hand hand2 = lxt.nextHand();
            if(hand1.isStrongThan(hand2)) {
                System.out.println("aaa赢");
                aaa.win();
                lxt.lost();
            }else if(hand2.isStrongThan(hand1)) {
                System.out.println("lxt赢");
                lxt.win();
                aaa.lost();
            }else{
                System.out.println("平");
                lxt.even();
                aaa.even();
            }
        }
        System.out.println("res:");
        System.out.println(aaa.toString());
        System.out.println(lxt.toString());
    }
}
